<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      header {
        width: 375px;
        height: 50px;
        background-color: red;
        text-align: center;
        line-height: 50px;
        color: #fff;
        font-size: 20px;
      }
    </style>
  </head>
  <body>
    <div id="app">
      <my-header title="猫眼电影">
        <span>🍌</span>
      </my-header>
      <br />
      <my-header title="麻将和"></my-header>
    </div>

    <script src="./lib/Vue3.js"></script>
    <script>
      const { createApp } = Vue;

      const MyHeader = {
        props: ["title"],
        template: `
          <header>{{ title }} - <slot></slot></header>
        `,
      };

      createApp({
        data() {
          return {};
        },
        components: {
          MyHeader,
        },
      }).mount("#app");
    </script>
  </body>
</html>
